<%@ page contentType="text/html;charset=UTF-8" autoFlush="true"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<b>增加共享资料分类：</b><hr>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
    <html:form action="/sfc" method="post" onsubmit="return validate(this)">
    <html:hidden property="action" value="add"/>
    <html:hidden property="parentId"/>
    <tr>
        <td align="right">名称</td>
        <td>
            <html:text property="name" size="20"/>
        </td>
    </tr>
   <tr>
        <td align="right">优先显示</td>
        <td>
            <html:text property="priority" size="2" value="1"/>
        </td>
    </tr>         
    <tr>
        <td align="right"></td>
        <td>
            <input type="submit" value="增加"/>&nbsp;&nbsp;&nbsp;&nbsp;
            <input type="button" value="放弃" onclick="cancelAdd()"/>
        </td>
    </tr>
    </html:form>
</table>
<script type="text/javascript">
    function validate(pForm)
    {
        if(pForm.name.value == "")
        {
            alert("[名称]必须输入");pForm.name.focus();
            return false;
        }
        return true;
    }
    function cancelAdd()
    {
        history.back(1);
    }
</script>